3.92 \(\int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx\)

Optimal. Leaf size=447 \[ d^2 x \left (\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}+1\right )^{-p} \left (\frac{2 c x^n}{\sqrt{b^2-4 a c}+b}+1\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p F_1\left (\frac{1}{n};-p,-p;1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}},-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )+\frac{2 d e x^{n+1} \left (\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}+1\right )^{-p} \left (\frac{2 c x^n}{\sqrt{b^2-4 a c}+b}+1\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p F_1\left (1+\frac{1}{n};-p,-p;2+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}},-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{n+1}+\frac{e^2 x^{2 n+1} \left (\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}+1\right )^{-p} \left (\frac{2 c x^n}{\sqrt{b^2-4 a c}+b}+1\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p F_1\left (2+\frac{1}{n};-p,-p;3+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}},-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{2 n+1} \]

[Out]

(2*d*e*x^(1 + n)*(a + b*x^n + c*x^(2*n))^p*AppellF1[1 + n^(-1), -p, -p, 2 + n^(-
1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/((1
 + n)*(1 + (2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]))^p*(1 + (2*c*x^n)/(b + Sqrt[b^2 - 4
*a*c]))^p) + (e^2*x^(1 + 2*n)*(a + b*x^n + c*x^(2*n))^p*AppellF1[2 + n^(-1), -p,
 -p, 3 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 -
4*a*c])])/((1 + 2*n)*(1 + (2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]))^p*(1 + (2*c*x^n)/(b
 + Sqrt[b^2 - 4*a*c]))^p) + (d^2*x*(a + b*x^n + c*x^(2*n))^p*AppellF1[n^(-1), -p
, -p, 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 -
 4*a*c])])/((1 + (2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]))^p*(1 + (2*c*x^n)/(b + Sqrt[b
^2 - 4*a*c]))^p)

_______________________________________________________________________________________

Rubi [A]  time = 0.99276, antiderivative size = 447, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.192 \[ d^2 x \left (\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}+1\right )^{-p} \left (\frac{2 c x^n}{\sqrt{b^2-4 a c}+b}+1\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p F_1\left (\frac{1}{n};-p,-p;1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}},-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )+\frac{2 d e x^{n+1} \left (\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}+1\right )^{-p} \left (\frac{2 c x^n}{\sqrt{b^2-4 a c}+b}+1\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p F_1\left (1+\frac{1}{n};-p,-p;2+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}},-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{n+1}+\frac{e^2 x^{2 n+1} \left (\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}+1\right )^{-p} \left (\frac{2 c x^n}{\sqrt{b^2-4 a c}+b}+1\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p F_1\left (2+\frac{1}{n};-p,-p;3+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}},-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{2 n+1} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p,x]

[Out]

(2*d*e*x^(1 + n)*(a + b*x^n + c*x^(2*n))^p*AppellF1[1 + n^(-1), -p, -p, 2 + n^(-
1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/((1
 + n)*(1 + (2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]))^p*(1 + (2*c*x^n)/(b + Sqrt[b^2 - 4
*a*c]))^p) + (e^2*x^(1 + 2*n)*(a + b*x^n + c*x^(2*n))^p*AppellF1[2 + n^(-1), -p,
 -p, 3 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 -
4*a*c])])/((1 + 2*n)*(1 + (2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]))^p*(1 + (2*c*x^n)/(b
 + Sqrt[b^2 - 4*a*c]))^p) + (d^2*x*(a + b*x^n + c*x^(2*n))^p*AppellF1[n^(-1), -p
, -p, 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 -
 4*a*c])])/((1 + (2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]))^p*(1 + (2*c*x^n)/(b + Sqrt[b
^2 - 4*a*c]))^p)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 123.616, size = 382, normalized size = 0.85 \[ d^{2} x \left (\frac{2 c x^{n}}{b - \sqrt{- 4 a c + b^{2}}} + 1\right )^{- p} \left (\frac{2 c x^{n}}{b + \sqrt{- 4 a c + b^{2}}} + 1\right )^{- p} \left (a + b x^{n} + c x^{2 n}\right )^{p} \operatorname{appellf_{1}}{\left (\frac{1}{n},- p,- p,1 + \frac{1}{n},- \frac{2 c x^{n}}{b - \sqrt{- 4 a c + b^{2}}},- \frac{2 c x^{n}}{b + \sqrt{- 4 a c + b^{2}}} \right )} + \frac{2 d e x^{n + 1} \left (\frac{2 c x^{n}}{b - \sqrt{- 4 a c + b^{2}}} + 1\right )^{- p} \left (\frac{2 c x^{n}}{b + \sqrt{- 4 a c + b^{2}}} + 1\right )^{- p} \left (a + b x^{n} + c x^{2 n}\right )^{p} \operatorname{appellf_{1}}{\left (\frac{n + 1}{n},- p,- p,2 + \frac{1}{n},- \frac{2 c x^{n}}{b - \sqrt{- 4 a c + b^{2}}},- \frac{2 c x^{n}}{b + \sqrt{- 4 a c + b^{2}}} \right )}}{n + 1} + \frac{e^{2} x^{2 n + 1} \left (\frac{2 c x^{n}}{b - \sqrt{- 4 a c + b^{2}}} + 1\right )^{- p} \left (\frac{2 c x^{n}}{b + \sqrt{- 4 a c + b^{2}}} + 1\right )^{- p} \left (a + b x^{n} + c x^{2 n}\right )^{p} \operatorname{appellf_{1}}{\left (2 + \frac{1}{n},- p,- p,3 + \frac{1}{n},- \frac{2 c x^{n}}{b - \sqrt{- 4 a c + b^{2}}},- \frac{2 c x^{n}}{b + \sqrt{- 4 a c + b^{2}}} \right )}}{2 n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((d+e*x**n)**2*(a+b*x**n+c*x**(2*n))**p,x)

[Out]

d**2*x*(2*c*x**n/(b - sqrt(-4*a*c + b**2)) + 1)**(-p)*(2*c*x**n/(b + sqrt(-4*a*c
 + b**2)) + 1)**(-p)*(a + b*x**n + c*x**(2*n))**p*appellf1(1/n, -p, -p, 1 + 1/n,
 -2*c*x**n/(b - sqrt(-4*a*c + b**2)), -2*c*x**n/(b + sqrt(-4*a*c + b**2))) + 2*d
*e*x**(n + 1)*(2*c*x**n/(b - sqrt(-4*a*c + b**2)) + 1)**(-p)*(2*c*x**n/(b + sqrt
(-4*a*c + b**2)) + 1)**(-p)*(a + b*x**n + c*x**(2*n))**p*appellf1((n + 1)/n, -p,
 -p, 2 + 1/n, -2*c*x**n/(b - sqrt(-4*a*c + b**2)), -2*c*x**n/(b + sqrt(-4*a*c +
b**2)))/(n + 1) + e**2*x**(2*n + 1)*(2*c*x**n/(b - sqrt(-4*a*c + b**2)) + 1)**(-
p)*(2*c*x**n/(b + sqrt(-4*a*c + b**2)) + 1)**(-p)*(a + b*x**n + c*x**(2*n))**p*a
ppellf1(2 + 1/n, -p, -p, 3 + 1/n, -2*c*x**n/(b - sqrt(-4*a*c + b**2)), -2*c*x**n
/(b + sqrt(-4*a*c + b**2)))/(2*n + 1)

_______________________________________________________________________________________

Mathematica [B]  time = 6.26088, size = 1522, normalized size = 3.4 \[ \frac{2^{-p} c \left (b+\sqrt{b^2-4 a c}\right ) d e (2 n+1) \left (x^n+\frac{b-\sqrt{b^2-4 a c}}{2 c}\right )^{-p} \left (\frac{2 c x^n+b-\sqrt{b^2-4 a c}}{c}\right )^{p+1} \left (\left (\sqrt{b^2-4 a c}-b\right ) x^n-2 a\right )^2 \left (\left (c x^n+b\right ) x^n+a\right )^{p-1} F_1\left (1+\frac{1}{n};-p,-p;2+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right ) x^{n+1}}{\left (\sqrt{b^2-4 a c}-b\right ) (n+1) \left (2 c x^n+b+\sqrt{b^2-4 a c}\right ) \left (n p x^n \left (\left (\sqrt{b^2-4 a c}-b\right ) F_1\left (2+\frac{1}{n};1-p,-p;3+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )-\left (b+\sqrt{b^2-4 a c}\right ) F_1\left (2+\frac{1}{n};-p,1-p;3+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right )-2 (2 n a+a) F_1\left (1+\frac{1}{n};-p,-p;2+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right )}+\frac{2^{-p-1} c \left (b+\sqrt{b^2-4 a c}\right ) e^2 (3 n+1) \left (x^n+\frac{b-\sqrt{b^2-4 a c}}{2 c}\right )^{-p} \left (\frac{2 c x^n+b-\sqrt{b^2-4 a c}}{c}\right )^{p+1} \left (\left (\sqrt{b^2-4 a c}-b\right ) x^n-2 a\right )^2 \left (\left (c x^n+b\right ) x^n+a\right )^{p-1} F_1\left (2+\frac{1}{n};-p,-p;3+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right ) x^{2 n+1}}{\left (\sqrt{b^2-4 a c}-b\right ) (2 n+1) \left (2 c x^n+b+\sqrt{b^2-4 a c}\right ) \left (n p x^n \left (\left (\sqrt{b^2-4 a c}-b\right ) F_1\left (3+\frac{1}{n};1-p,-p;4+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )-\left (b+\sqrt{b^2-4 a c}\right ) F_1\left (3+\frac{1}{n};-p,1-p;4+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right )-2 (3 n a+a) F_1\left (2+\frac{1}{n};-p,-p;3+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right )}-\frac{2^{-2 p-1} \left (b+\sqrt{b^2-4 a c}\right ) d^2 (n+1) \left (x^n+\frac{b-\sqrt{b^2-4 a c}}{2 c}\right )^{-p} \left (x^n+\frac{b+\sqrt{b^2-4 a c}}{2 c}\right )^{-p} \left (-2 c x^n-b+\sqrt{b^2-4 a c}\right ) \left (\frac{2 c x^n+b-\sqrt{b^2-4 a c}}{c}\right )^p \left (\frac{2 c x^n+b+\sqrt{b^2-4 a c}}{c}\right )^{p-1} \left (\left (\sqrt{b^2-4 a c}-b\right ) x^n-2 a\right )^2 \left (\left (c x^n+b\right ) x^n+a\right )^{p-1} F_1\left (\frac{1}{n};-p,-p;1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right ) x}{c \left (\sqrt{b^2-4 a c}-b\right ) \left (\left (\sqrt{b^2-4 a c}-b\right ) n p F_1\left (1+\frac{1}{n};1-p,-p;2+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right ) x^n-\left (b+\sqrt{b^2-4 a c}\right ) n p F_1\left (1+\frac{1}{n};-p,1-p;2+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right ) x^n-2 a (n+1) F_1\left (\frac{1}{n};-p,-p;1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}},\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right )} \]

Warning: Unable to verify antiderivative.

[In]  Integrate[(d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p,x]

[Out]

(c*(b + Sqrt[b^2 - 4*a*c])*d*e*(1 + 2*n)*x^(1 + n)*((b - Sqrt[b^2 - 4*a*c] + 2*c
*x^n)/c)^(1 + p)*(-2*a + (-b + Sqrt[b^2 - 4*a*c])*x^n)^2*(a + x^n*(b + c*x^n))^(
-1 + p)*AppellF1[1 + n^(-1), -p, -p, 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*
c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])])/(2^p*(-b + Sqrt[b^2 - 4*a*c])*(1 + n)*
((b - Sqrt[b^2 - 4*a*c])/(2*c) + x^n)^p*(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)*(-2*(a
 + 2*a*n)*AppellF1[1 + n^(-1), -p, -p, 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*
a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])] + n*p*x^n*((-b + Sqrt[b^2 - 4*a*c])*A
ppellF1[2 + n^(-1), 1 - p, -p, 3 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (
2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])] - (b + Sqrt[b^2 - 4*a*c])*AppellF1[2 + n^(-1)
, -p, 1 - p, 3 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqr
t[b^2 - 4*a*c])]))) + (2^(-1 - p)*c*(b + Sqrt[b^2 - 4*a*c])*e^2*(1 + 3*n)*x^(1 +
 2*n)*((b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)/c)^(1 + p)*(-2*a + (-b + Sqrt[b^2 - 4*a
*c])*x^n)^2*(a + x^n*(b + c*x^n))^(-1 + p)*AppellF1[2 + n^(-1), -p, -p, 3 + n^(-
1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])])/((-
b + Sqrt[b^2 - 4*a*c])*(1 + 2*n)*((b - Sqrt[b^2 - 4*a*c])/(2*c) + x^n)^p*(b + Sq
rt[b^2 - 4*a*c] + 2*c*x^n)*(-2*(a + 3*a*n)*AppellF1[2 + n^(-1), -p, -p, 3 + n^(-
1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])] + n*
p*x^n*((-b + Sqrt[b^2 - 4*a*c])*AppellF1[3 + n^(-1), 1 - p, -p, 4 + n^(-1), (-2*
c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])] - (b + Sqrt[
b^2 - 4*a*c])*AppellF1[3 + n^(-1), -p, 1 - p, 4 + n^(-1), (-2*c*x^n)/(b + Sqrt[b
^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]))) - (2^(-1 - 2*p)*(b + Sqrt[b
^2 - 4*a*c])*d^2*(1 + n)*x*(-b + Sqrt[b^2 - 4*a*c] - 2*c*x^n)*((b - Sqrt[b^2 - 4
*a*c] + 2*c*x^n)/c)^p*((b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)/c)^(-1 + p)*(-2*a + (-b
 + Sqrt[b^2 - 4*a*c])*x^n)^2*(a + x^n*(b + c*x^n))^(-1 + p)*AppellF1[n^(-1), -p,
 -p, 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 -
4*a*c])])/(c*(-b + Sqrt[b^2 - 4*a*c])*((b - Sqrt[b^2 - 4*a*c])/(2*c) + x^n)^p*((
b + Sqrt[b^2 - 4*a*c])/(2*c) + x^n)^p*((-b + Sqrt[b^2 - 4*a*c])*n*p*x^n*AppellF1
[1 + n^(-1), 1 - p, -p, 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n
)/(-b + Sqrt[b^2 - 4*a*c])] - (b + Sqrt[b^2 - 4*a*c])*n*p*x^n*AppellF1[1 + n^(-1
), -p, 1 - p, 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sq
rt[b^2 - 4*a*c])] - 2*a*(1 + n)*AppellF1[n^(-1), -p, -p, 1 + n^(-1), (-2*c*x^n)/
(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]))

_______________________________________________________________________________________

Maple [F]  time = 0.134, size = 0, normalized size = 0. \[ \int \left ( d+e{x}^{n} \right ) ^{2} \left ( a+b{x}^{n}+c{x}^{2\,n} \right ) ^{p}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x)

[Out]

int((d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int{\left (e x^{n} + d\right )}^{2}{\left (c x^{2 \, n} + b x^{n} + a\right )}^{p}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x^n + d)^2*(c*x^(2*n) + b*x^n + a)^p,x, algorithm="maxima")

[Out]

integrate((e*x^n + d)^2*(c*x^(2*n) + b*x^n + a)^p, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left ({\left (e^{2} x^{2 \, n} + 2 \, d e x^{n} + d^{2}\right )}{\left (c x^{2 \, n} + b x^{n} + a\right )}^{p}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x^n + d)^2*(c*x^(2*n) + b*x^n + a)^p,x, algorithm="fricas")

[Out]

integral((e^2*x^(2*n) + 2*d*e*x^n + d^2)*(c*x^(2*n) + b*x^n + a)^p, x)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d+e*x**n)**2*(a+b*x**n+c*x**(2*n))**p,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x^n + d)^2*(c*x^(2*n) + b*x^n + a)^p,x, algorithm="giac")

[Out]

Exception raised: TypeError